


def select_sort(lst):
    """
    选择排序
    :param lst: 
    :return: 
    """
    for i in range(len(lst)):
        m = i
        for j in range(i+1, len(lst)):
            if lst[m]>lst[j]:
                m = j
        lst[i],lst[m]=lst[m], lst[i]
    return lst
        
lst = [90, 28, 19, 99, 38, 79, 65 ,2]
# 从小到大排序
print(select_sort(lst))
